\tracingonline=2
\tracingcommands=2
\tracingmacros=2
\tracingrestores=2

\catcode`{=1
\catcode`}=2
\catcode`$=3
\catcode`#=6
\catcode`@=11

{\uccode`1=`i \uccode`2=`f \uppercase{\gdef\if@12{}}}

\count77=\escapechar
\escapechar=-1
\expandafter \if@ \string \iffoo
\expandafter \if@ \string \fifoo

\escapechar=\count77
\end

